    var drag = 0  
    var move = 0  
    var frameHeight = 400;
    var frameWidth = 1020; 
       // 拖拽对象  
    // 参见：http://blog.sina.com.cn/u/4702ecbe010007pe  
    var ie = document.all;  
    var nn6 = document.getElementById && !document.all;  
    var isdrag = false;  
    var y, x;  
    var oDragObj;  
  
    function moveMouse(e) {  
    	frameHeight = document.body.clientHeight;
    	frameWidth = document.body.clientWidth;
        if (isdrag) {  
        	var tempTop = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) ;
        	var tempLeft =  (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x);
        	if(tempTop < frameHeight -20 && tempTop > 20 - images1.height)
        		oDragObj.style.top = tempTop + "px";  
        	if(tempLeft < frameWidth -20 && tempLeft > 20-images1.width)
        		oDragObj.style.left = tempLeft + "px";   
            return false;  
        }  
    }  
  
    function initDrag(e) {   
        var oDragHandle = nn6 ? e.target : event.srcElement;  
        var topElement = "HTML";  
        while (oDragHandle.tagName != topElement && oDragHandle.className != "dragAble") {  
            oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement;  
        }  
        if (oDragHandle.className == "dragAble") {  
            isdrag = true;  
            oDragObj = oDragHandle;  
            nTY = parseInt(oDragObj.style.top + 0);  
            y = nn6 ? e.clientY : event.clientY;  
            nTX = parseInt(oDragObj.style.left + 0);  
            x = nn6 ? e.clientX : event.clientX;  
            document.onmousemove = moveMouse;  
            return false;  
        }  
    }  
    document.onmousedown = initDrag;  
    document.onmouseup = new Function("isdrag=false");  
  
    function clickMove(s) { 
    	 frameHeight = document.body.clientHeight;
    	 frameWidth = document.body.clientWidth;
        if (s == "up") {  
        	var tempTop = parseInt(dragObj.style.top) + 100;  
            dragObj.style.top = tempTop-100 >= 0?0:tempTop; 
        } else if (s == "down") {  
        	var tempTop = parseInt(dragObj.style.top) - 100;  
        	var tempTop2 = frameHeight - images1.height; 
            dragObj.style.top = images1.height + tempTop+100 <= frameHeight?tempTop2:tempTop; 
        } else if (s == "left") {  
        	var tempLeft = parseInt(dragObj.style.left) + 100; 
            dragObj.style.left = tempLeft-100 >=0?0:tempLeft;  
        } else if (s == "right") {  
        	var tempLeft = parseInt(dragObj.style.left) - 100; 
        	var tempLeft2 = frameWidth - images1.width; 
            dragObj.style.left = images1.width + tempLeft+100 <= frameWidth?tempLeft2:tempLeft;  
        }  
  
    }  
  
    function smallit() {  
        var height1 = images1.height;  
        var width1 = images1.width;  
        images1.height = height1 / 1.2;  
        images1.width = width1 / 1.2;  
    }  
  
    function bigit() {  
        var height1 = images1.height;  
        var width1 = images1.width;  
        images1.height = height1 * 1.2;  
        images1.width = width1 * 1.2;  
    }  
    function realsize() {  
        images1.height = images2.height;  
        images1.width = images2.width;  
        block1.style.left = 0;  
        block1.style.top = 0;  
  
    }  
  
    window.onload = function () {  
       // var height1 = document.body.clientHeight;  
       // var width1 = document.body.clientWidth;  
	   var height1 = 400;
	   var width1 = 1100;
        images1.height = height1 ;  
        images1.width = width1;  
    }  
   